</> Code Challenge: Determine password length


// JavaScript code​​​​​​‌‌​‌​‌‌​​​‌‌‌‌​‌‌​​‌​​‌‌​ below
// Write your answer here, and then test your code.
// Your job is to implement the findPasswordLength() method.

// Change these boolean values to control whether you see 
// the expected answer and/or hints.
const showExpectedResult = false;
const showHints = false;

const success = "Success";
const needLongerPassword = "Password should be at least 8 characters";

function findPasswordLength(password) {
    // Your code goes here
    if (password.length >= 8) {
        return success; // Use variable defined above
    } else {
        return needLongerPassword; // Use variable defined above
    }
}
